package controller;

/**
 *
 * @author christian Gartner Nielsen
 */
import model.ItemGroup;
import model.ItemGroupCollection;

public class ItemGroupController {

	private ItemGroupCollection itemGroups;

	public ItemGroupController() {
		itemGroups = ItemGroupCollection.getInstance();
	}

	public void createGroup(String name) {
		ItemGroup group = new ItemGroup();
		group.setName(name);
		itemGroups.addItemGroup(group);
	}

	public ItemGroup[] getGroups() {
		return itemGroups.getItemGroups();
	}

	public ItemGroup chooseGroup(String name) {
		return itemGroups.getItemGroup(name);
	}

}
